﻿/****************************** Module Header ******************************\
 * Module Name:  tUserBusinessMessage.cs
 * Module Version:  1.0.0 (2013-01-25)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System;

namespace UCL.Data.ORM.UMD
{
    /// <summary>
    /// 系统-商业消息(手机短信/电子邮件) 数据实体类
    /// </summary>
    [DBTable(Common = "系统-商业消息(手机短信/电子邮件)")]
    public class tUserBusinessMessage
    {
        /// <summary>
        /// Guid编号
        /// </summary>
        public Guid ID { get { return _ID ?? default(Guid); } set { _ID = value; } }

        [DBColumn(Alias = "Guid编号", IsKey = true, DefaultValue = "newid()")]
        private Guid? _ID;

        /// <summary>
        ///  收信人会员帐号
        /// </summary>
        public string ToUserName { get { return _ToUserName; } set { _ToUserName = value; } }

        [DBColumn(Alias = "收信人会员帐号", Length = "32")]
        private string _ToUserName;

        /// <summary>
        /// 发信人会员帐号
        /// </summary>
        public string FromUserName { get { return _FromUserName; } set { _FromUserName = value; } }

        [DBColumn(Alias = "发信人会员帐号", Length = "32")]
        private string _FromUserName;

        /// <summary>
        /// 发信人帐号(邮件地址或手机号码)
        /// </summary>
        public string From { get { return _From; } set { _From = value; } }

        [DBColumn(Alias = "发信人帐号", Common = "邮件地址或手机号码", Length = "32")]
        private string _From;

        /// <summary>
        /// 收信人帐号(邮件地址或手机号码)
        /// </summary>
        public string To { get { return _To; } set { _To = value; } }

        [DBColumn(Alias = "收信人帐号", Common = "邮件地址或手机号码", Length = "32")]
        private string _To;

        /// <summary>
        /// 发信人别名
        /// </summary>
        public string FromAlias { get { return _FromAlias; } set { _FromAlias = value; } }

        [DBColumn(Alias = "发信人别名", CanBeNull = true, Length = "32")]
        private string _FromAlias;

        /// <summary>
        /// 标题
        /// </summary>
        public string Subject { get { return _Subject; } set { _Subject = value; } }

        [DBColumn(Alias = "标题", CanBeNull = true, Length = "32")]
        private string _Subject;

        /// <summary>
        /// 正文
        /// </summary>
        public string Body { get { return _Body; } set { _Body = value; } }

        [DBColumn(Alias = "正文", CanBeNull = true, Length = "Max")]
        private string _Body;

        /// <summary>
        /// 最多发送失败次数
        /// </summary>
        public short LimitCount { get { return _LimitCount ?? default(short); } set { _LimitCount = value; } }

        [DBColumn(Alias = "最多发送失败次数", DefaultValue = "5")]
        private short? _LimitCount;

        /// <summary>
        /// 尝试发送失败次数
        /// </summary>
        public short SendCount { get { return _SendCount ?? default(short); } set { _SendCount = value; } }

        [DBColumn(Alias = "尝试发送失败次数", DefaultValue = "0")]
        private short? _SendCount;

        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTime SendTime { get { return _SendTime ?? default(DateTime); } set { _SendTime = value; } }

        [DBColumn(Alias = "发送时间", CanBeNull = true)]
        private DateTime? _SendTime;

        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime ExpiresTime { get { return _ExpiresTime ?? default(DateTime); } set { _ExpiresTime = value; } }

        [DBColumn(Alias = "过期时间", CanBeNull = true)]
        private DateTime? _ExpiresTime;

        /// <summary>
        /// 扩展标签(sms=手机短信,email=电子邮件)
        /// </summary>
        public string ExTags { get { return _ExTags; } set { _ExTags = value; } }

        [DBColumn(Alias = "扩展标签", Common = "sms=手机短信,email=电子邮件", Length = "16")]
        private string _ExTags;

        /// <summary>
        /// 状态
        /// </summary>
        public short State { get { return _State ?? default(short); } set { _State = value; } }

        [DBColumn(Alias = "状态", DefaultValue = "0")]
        private short? _State;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get { return _CreatedTime ?? default(DateTime); } set { _CreatedTime = value; } }

        [DBColumn(Alias = "创建时间", DefaultValue = "getdate()")]
        private DateTime? _CreatedTime;

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime ModifiedTime { get { return _ModifiedTime ?? default(DateTime); } set { _ModifiedTime = value; } }

        [DBColumn(Alias = "最后更新时间", CanBeNull = true)]
        private DateTime? _ModifiedTime;

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get { return _IsDeleted ?? default(bool); } set { _IsDeleted = value; } }

        [DBColumn(Alias = "是否删除", DefaultValue = "0")]
        private bool? _IsDeleted;

        /// <summary>
        /// 网站标签
        /// </summary>
        public string SiteTag { get { return _SiteTag; } set { _SiteTag = value; } }

        [DBColumn(Alias = "网站标签", CanBeNull = true, Length = "16")]
        private string _SiteTag;

    }
}
